package com.bjsxt.homework1;

public class NumberThread extends Thread {

    private Printer printer;

    public NumberThread(Printer printer) {
        this.printer = printer;
    }

    @Override
    public void run() {

        for (int i = 1; i <= 52; i += 2) {
            //System.out.print(i);
            printer.printNumber(i);
        }
    }
}
